package calculator.ast;

import javapop.framework.parser.expr.ExprNode;
import javapop.framework.parser.expr.PrefixNode;

public abstract class PrefixOp extends Expr implements PrefixNode {
	private ExprNode operand;
	private int prio;
	
	protected PrefixOp() {
		prio = -1;
		operand = null;
	}
	
	@Override
	public Expr getOperand() {
		return (Expr) operand;
	}

	@Override
	public void setOperand(ExprNode operand) {
		this.operand = operand;
	}

	@Override
	public int getPrio() {
		return prio;
	}

	@Override
	public void setPrio(int prio) {
		this.prio = prio;
	}
	
	
	@Override
	public boolean isPrefix() {		
		return true;
	}
}
